/*
 * @features: 功能
 * @description: 说明
 * @Date: 2020-11-03 23:34:23
 * @Author: judu233(769471424@qq.com)
 * @LastEditTime: 2020-11-03 23:47:56
 * @LastEditors: judu233
 */
import { JoystickType, instance, JOYSTICK_TYPE } from "./Joystick";

const { ccclass } = cc._decorator;

@ccclass
export default class UI extends cc.Component {
  /**
   * 使用固定摇杆
   */
  useFixedType() {
    instance.emit(JOYSTICK_TYPE, JoystickType.FIXED);
  }

  /**
   * 使用跟随摇杆
   */
  useFollowType() {
    instance.emit(JOYSTICK_TYPE, JoystickType.FOLLOW);
  }
}
